package com.auqaoasis.operator;

import com.auqaoasis.exception.DbException;
import com.auqaoasis.model.row.Row;
import com.auqaoasis.model.table.TableDesc;

import java.util.NoSuchElementException;

/**
 * @Author Auqaoasis
 * @Date 2022/3/31 - 19:37
 * @Description: 迭代器接口，行数据的迭代
 */
public interface IOperatorIterator {

    void open() throws DbException;

    boolean hasNext() throws DbException;

    Row next() throws DbException, NoSuchElementException;

    void close();

    /**
     * 返回表结构
     * @return TableDesc
     */
    TableDesc getTableDesc();
}
